//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Spreadsheet.Data
{
    internal class Index: Pivot.PivotTableValue
    {
        private int _v
                    ;

        internal const string xmlName = "x";

        public override object Value
        {
            get { return _v; }
        }

        public override void ReadXml(ReadContext context)
        {
            using (var c = context.Read(xmlName))
            {
                _v = c.GetInteger("v");
            }

        }

        public override void WriteXml(WriteContext context)
        {
            using (var c = context.Write(xmlName))
            {
                c.SetInteger("v",  (int)Value);
            }
        }
    }
}